<script type="text/javascript">
    //interval_user=setInterval('scrollProfileContent("<?php echo BASE_URL?>",<?php if(!empty($user)) echo $user['ID_USER']; else echo '-1'?>);', 1000);
</script>    
        <!-- ::::::::::::::::::::: START OF BODY PART ::::::::::::::::::::: -->
        <?php if(!empty($user)){?>
        <div class="detbox">
            <div class="dettop"></div>
            <div class="detmain">
                <div class="userheader">
                    <?php echo $user['USERNAME']?>'s Profile
                    <?php
                        if(!empty($_SESSION['login'])){
                            if($user['ID_USER']!=$_SESSION['id']){
                                echo '
                                    <div class="right" id="compose-new" onclick="compose()"></div>
                                    ';
                            }
                        }
                    ?>
                </div>
                <div class="useravatar">
                    <?php 
                        if(!empty($user['AVATAR'])) 
                            echo '
                                <img src="'.BASE_URL.'avatar/'.$user['AVATAR'].'" width="150" alt="'.$user['USERNAME'].'">
                                ';
                        else
                            echo '
                                <img src="'.BASE_URL.'img/avatar.jpg" width="150" alt="'.$user['USERNAME'].'">
                                ';
                    ?>
                </div>
                <div class="userdata">
                    <div class="userdata-header">
                        <div class="subtitle left ">USER INFORMATION</div>
                        <?php
                            if(!empty($_SESSION['login']) && $_SESSION['id']==$user['ID_USER'])
                                echo '<div class="edituser left clearfix" onclick="editProfile();checkEditProfile(\''.BASE_URL.'\')">EDIT</div>';
                            else{
                                echo '';
                            }
                        ?>
                    </div>
                    <div class="user-attribute">
                        <div class="lhs left">FULL NAME</div>
                        <div class="rhs left clearfix"><?php echo $user['NAMA']?></div>
                        <div class="lhs left">E-MAIL</div>
                        <div class="rhs left clearfix"><?php echo $user['EMAIL']?></div>
                    </div>
                    <div class="clear">
                    </div>
                    <?php if(!empty($user['KONTEN'])){
                        echo '
                    <div class="show-more-post">
                        <div class="buttonprevious" >PREVIOUS</div>
                        <div class="buttonnext" style="margin-left: 9px;">NEXT</div>
                    </div>';
                    }?>
                </div>
                <div class="userachievement">
                    <div class="subtitle left ">ACHIEVEMENTS</div>
                    <div class="clearfix"></div>
                    <!-- ACHIEVEMENT LIST -->
                </div>
            </div>
            <div class="detbot"></div>
        </div>
        <div style="height: 10px;"></div>

        <!-- EDIT DIV POP OUT -->
        <form method="post" action="<?php echo BASE_URL?>user_con/edit_user" >
        <div class="edituserdata" id="edituserdata">
            <div class="edittop"></div>
            <div class="editmain">
                <div class="subtitle" style="margin: 0 20px;">EDIT PROFILE DATA</div>
                <!--
                <div class="txtfieldbox width90" style="border-top: 0; padding-top: 10px;">
                    <div class="left txtboxlabel">OLD PASSWORD</div>
                    <div class="right">
                        <input class="txtfield" type="password" size="30" name="password" onkeydown="ProcessPassword(this)" onkeyup="ProcessPassword(this)" />
                    </div>
                    <div class="clear"></div>
                    <div class="error" id="passwordError">Password must be at least 8 character.</div>
                </div>
                <div class="txtfieldbox width90">
                    <div class="left txtboxlabel">NEW PASSWORD</div>
                    <div class="right">
                        <input class="txtfield" type="password" size="30" name="newpass" onkeydown="ProcessPassword(this)" onkeyup="ProcessPassword(this)" />
                    </div>
                    <div class="clear"></div>
                    <div class="error" id="passwordError">Password must be at least 8 character.</div>
                </div>
                <div class="txtfieldbox width90">
                    <div class="left txtboxlabel">CONFIRM PASSWORD</div>
                    <div class="right">
                        <input class="txtfield" type="password" size="30" name="confirm" onkeydown="ProcessCPassword(this)" onkeyup="ProcessCPassword(this)" />
                    </div>
                    <div class="clear"></div>
                    <div class="error" id="cpasswordError">The password is not match.</div>
                </div>
                      -->
                <div class="txtfieldbox width90">
                    <div class="left txtboxlabel">EMAIL</div>
                    <div class="right">
                        <input class="txtfield" id="email-input" type="text" value="<?php echo $user['EMAIL']?>" size="30" name="email" onkeyup="checkEditProfile('<?php echo BASE_URL?>')" />
                    </div>
                    <div class="clear"></div>
                    <div class="error" id="emailError"></div>
                </div>
                <div class="txtfieldbox width90">
                    <div class="right">
                        <input class="joinbutton" id="edit-submit" type="submit" name="edit" value="Edit my Account!" />
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <div class="editbot"></div>
        </div>
        </form>
                    <?php }?>

        <!---------------------->

        <!-- ::::::::::::::::::::: END OF BODY PART ::::::::::::::::::::: -->